<template>
  <div>
    <div class="nav_main">
      <!-- <router-link to="/find/recommend/one">肖政的rap</router-link>
      <router-link to="/find/recommend/two">肖太郎的尬舞</router-link>
      <router-link to="/find/recommend/three">肖桑野蛮冲撞</router-link> -->
      <span @click="gotoRap('/find/recommend/one', 'One')">肖政的rap</span>
      <span @click="gotoDance('/find/recommend/two', 'Two')">肖太郎的尬舞</span>
      <span @click="gotoDash('/find/recommend/three', 'Three')"
        >肖桑野蛮冲撞</span
      >
    </div>

    <div style="1px solid red;">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Recommend',

  data () {
    return {}
  },
  methods: {
    gotoRap (path, name) {
      this.$router
        .push({
          name
        })
        .catch(e => e)
    },
    gotoDance (path, name) {
      this.$router
        .push({
          name
        })
        .catch(e => e)
    },
    gotoDash (path, name) {
      this.$router
        .push({
          name,
          params: {
            name: '肖桑',
            age: 23
          }
        })
        .catch(e => e)
    }
  }
}
</script>

<style scoped>
.nav_main {
  background-color: green;
  color: white;
  padding: 10px 0;
}
.nav_main a,
span {
  text-align: center;
  text-decoration: none;
  color: white;
  font-size: 12px;
  margin: 7px 17px 0;
  padding: 0px 15px 2px 15px;
  height: 20px;
  display: inline-block;
  line-height: 20px;
  border-radius: 20px;
}
.nav_main a:hover,
span:hover {
  background-color: brown;
}
.nav_main .router-link-active {
  background-color: brown;
}
</style>
